#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<stdio.h>
#include<stdlib.h>
int main()
{
    int fd=open("log.txt",O_RDONLY);
    if(fd<0)
    {
        perror("open erro");
        exit(1);
    }
    char buff[1024];
    read(fd,buff,sizeof(buff));
    printf("%s\n",buff);
    return 0;
}
